#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int  main()
{
    int m, n;
    int g, s, b, i;
    int flower_num;
    while (scanf("%d%d", &m, &n) != EOF)
    {
        flower_num = 0;
        for (i = m; i <= n; i++)
        {
            g = i % 10;
            s = i / 10 % 10;
            b = i / 10 / 10 % 10;
            if (i == g * g * g + s * s * s + b * b * b)
            {
                printf("%d ", i);
                flower_num++;
            }
        }
        if (flower_num == 0)  printf("no");
        printf("\n");
    }
    return 0;
}
